import 'package:flutter/material.dart';

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text("Column_Row"), // 标题
          leading: Icon(Icons.menu), // 左侧图标
          actions: [Icon(Icons.settings)],  // 右侧图标数组
          elevation: 0.0,// 去掉阴影
          centerTitle: true, // 标题居中

        ),
        body:ColumnRowDemo()
    );
  }
}
class ColumnRowDemo extends StatelessWidget {
  //const ColumnRowDemo({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.lightGreen,
      width:double.infinity,  // 宽度适配
      child: Column(  // 垂直方向
        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Icon(Icons.access_alarm,size: 30),
          Icon(Icons.accessible_forward_outlined,size: 30),
          Icon(Icons.settings,size: 30),
          Icon(Icons.add_box,size: 30),
          Row(  // 水平方向
              mainAxisAlignment: MainAxisAlignment.end,
              children: [
              Icon(Icons.access_alarm,size: 30),
              Icon(Icons.accessible_forward_outlined,size: 30),
              Icon(Icons.settings,size: 30),
              Icon(Icons.add_box,size: 30),
             ]
          )
        ],
      ),
    );
  }
}
